/* 全局样式 */
:root {
  --config-editor-primary: #409eff;
  --config-editor-success: #67c23a;
  --config-editor-warning: #e6a23c;
  --config-editor-danger: #f56c6c;
  --config-editor-info: #909399;
  
  --config-editor-bg: #f5f5f5;
  --config-editor-card-bg: #ffffff;
  --config-editor-border: #dcdfe6;
  --config-editor-text: #303133;
  --config-editor-text-secondary: #606266;
}

/* 深色主题 */
.dark {
  --config-editor-bg: #1a1a1a;
  --config-editor-card-bg: #2d2d2d;
  --config-editor-border: #4c4d4f;
  --config-editor-text: #e5eaf3;
  --config-editor-text-secondary: #a3a6ad;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--config-editor-bg);
  color: var(--config-editor-text);
  transition: background-color 0.3s, color 0.3s;
}

#app {
  height: 100vh;
  overflow: hidden;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--config-editor-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--config-editor-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--config-editor-info);
}

/* 配置编辑器专用样式 */
.config-editor-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.config-editor-header {
  background: var(--config-editor-card-bg);
  border-bottom: 1px solid var(--config-editor-border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.config-editor-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.config-editor-sidebar {
  width: 280px;
  background: var(--config-editor-card-bg);
  border-right: 1px solid var(--config-editor-border);
  overflow-y: auto;
}

.config-editor-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--config-editor-bg);
}

/* 配置项卡片 */
.config-item-card {
  background: var(--config-editor-card-bg);
  border: 1px solid var(--config-editor-border);
  border-radius: 8px;
  margin-bottom: 16px;
  transition: all 0.3s;
}

.config-item-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--config-editor-primary);
}

/* 表单样式增强 */
.config-form-item {
  margin-bottom: 20px;
}

.config-form-label {
  font-weight: 600;
  color: var(--config-editor-text);
  margin-bottom: 8px;
  display: block;
}

.config-form-description {
  font-size: 12px;
  color: var(--config-editor-text-secondary);
  margin-top: 4px;
}

/* 代码编辑器容器 */
.monaco-editor-container {
  border: 1px solid var(--config-editor-border);
  border-radius: 6px;
  overflow: hidden;
}

/* 加载状态 */
.config-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--config-editor-text-secondary);
}

/* 工具栏 */
.config-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--config-editor-card-bg);
  border: 1px solid var(--config-editor-border);
  border-radius: 8px;
}

/* 状态指示器 */
.config-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.config-status.success {
  background: var(--config-editor-success);
  color: white;
}

.config-status.warning {
  background: var(--config-editor-warning);
  color: white;
}

.config-status.error {
  background: var(--config-editor-danger);
  color: white;
}

.config-status.info {
  background: var(--config-editor-info);
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .config-editor-sidebar {
    width: 200px;
  }
  
  .config-editor-content {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .config-editor-main {
    flex-direction: column;
  }
  
  .config-editor-sidebar {
    width: 100%;
    height: 200px;
  }
}
